<script setup>
import {ref, defineEmits} from 'vue'
const emit = defineEmits(['openBookPopup'])

const bookClick = () => {
  emit('openBookPopup')
}
</script>

<template>
<div class="card">
  <div :class="[index > 0 ? 'list_line' : '', 'list']" v-for="(item, index) in Array(2)" :key="index">
    <div class="left">
      <div class="name">成人票</div>
      <div class="tag_list">
        <div class="sales">月售1000+</div>
        <div class="book">预订须知&nbsp;></div>
      </div>
    </div>
    <div class="right">
      <div class="price">
        <div class="icon">￥</div>
        <div class="number">80</div>
        <div class="qi">起</div>
      </div>
      <div class="book_button" @click="bookClick">
        预订
      </div>
    </div>
  </div>
</div>
</template>

<style scoped lang="scss">
.card{
  display: flex;
  flex-direction: column;
  margin: 1rem 0 1.5rem 0;
  background: #FFFFFC;
  box-shadow: 0 .7rem 1.5rem 0 rgba(54,141,88,0.05);
  border-radius: 1rem;
  opacity: 1;
  overflow: hidden;
  .list{
    display: flex;
    align-items: center;
    justify-content: space-between;
    //margin: 1.5rem 1rem;
    margin: 0 1rem;
    padding: 1.5rem 0;
    .left{
      .name{
        font-size: 1.6rem;
        font-weight: bold;
        margin-bottom: .8rem;
        color: #333333;
      }
      .tag_list{
        display: flex;
        flex-wrap: wrap;
        .sales{
          height: 1.7rem;
          background: rgba(79,172,145,0.1);
          border-radius: .3rem;
          opacity: 1;
          font-size: 1.2rem;
          color: var(--van-primary-color);
          line-height: 1.7rem;
        }
        .book{
          margin-left: .8rem;
          height: 1.7rem;
          font-size: 1.2rem;
          color: #999999;
          line-height: 1.7rem;
        }
      }
    }
    .right{
      display: flex;
      .price{
        display: flex;
        align-items: baseline;
        position: relative;
        top: 0.5rem;
        color: #ED6316;
        margin-right: 1rem;
        .icon{
          font-size: 1.4rem;
        }
        .number{
          font-size: 2.2rem;
          padding: 0 .2rem 0 .1rem;
        }
        .qi{
          font-size: 1.2rem;
        }
      }
      .book_button{
        height: 3rem;
        background: var(--van-primary-color);
        border-radius: .5rem;
        opacity: 1;
        font-size: 1.4rem;
        font-weight: normal;
        color: #FFFFFF;
        line-height: 3rem;
        padding: 0 1.5rem;
      }
      .book_button:active{
        background: #4b947f;
      }
    }
  }
  .list_line{
    border-top: .1rem solid #eeeeee;
  }
}
</style>